/**
  ETFRoot project, Anyang Normal University && IMP-CAS
  \class ETFVMEOfflineSource
  \brief to process VME offline data
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2021-10-02
  \date 2021-10-02 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                    </tr>
  <tr>  <td>2021-10-02   <td>Asia Sun    <td>file created                   </tr>
  </table>

  \copyright Copyright (c) 2021 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFVMEOfflineSource_h
#define ETFVMEOfflineSource_h

#include <TString.h>
#include "ETFOfflineSource.h"

class ETFVMEUnpacker;

class ETFVMEOfflineSource : public ETFOfflineSource{
public:
  ETFVMEOfflineSource(const string &file = "");
  virtual ~ETFVMEOfflineSource();

  virtual bool Init(); ///< open the file
  const TString &GetFileName() const{ return fFileName; }
  virtual const TString ROOTFileName() const; ///< generate a file name for the output root
  virtual void FinishEvent(); // do something (e.g. print sth.) upon finishing an event

  ClassDef(ETFVMEOfflineSource, 0); ///< to process VME offline data

protected:
  TString fFileName;
  FILE *fFp; ///< C file pointer
  ETFVMEUnpacker *fUnpacker; //!
};

#endif
